<?php
define('S', 'http://hpcms.googlecode.com/svn/trunk/');
define('T', dirname(dirname(__FILE__))."/tmp/svntemp");
define('R', dirname(dirname(__FILE__)));
if (!isset($_GET['auth']) || $_GET['auth']!='alix') die('auth fail');
if (!file_exists(T)) {
    mkdir(T);
    $cmd = "svn checkout -q --force ".S." ".T;
    `$cmd`;
    echo "checkout ..";
} else {
    chdir(T);
    `svn update -q --force .`;
    echo "update ..";
}
//$cmd = "rm -rf ".T."/etc/*.db";//donot update db bye svn
//`$cmd`;
$cmd = "cp --update --recursive ".T."/* ".R."/";
`$cmd`;
echo " copy .. done.";

